cl-preloaded.el (built-in-class): New type
authorStefan Monnier <monnier@iro.umontreal.ca>
Wed, 6 Mar 2024 21:32:35 +0000 (16:32 -0500)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 8 Mar 2024 07:03:55 +0000 (02:03 -0500)
commit4fdcbd09af29e72456c9ca4cfbc9f6e97a88f8b8
treef9c04d33f9669584fe4de42c4980a6c75f0baad3
parent9830421e964cfb39077b69efd38d122e3bacf5d4
cl-preloaded.el (built-in-class): New type

Add classes describing the built-in types.

* lisp/emacs-lisp/cl-preloaded.el (built-in-class): New type.
(cl--define-built-in-type): New aux macro.
(all built-in types): "Define" them with it.
(cl--builtin-type-p): New aux function.
(cl--struct-name-p): Use it.
(cl--direct-supertypes-of-type, cl--typeof-types, cl--all-builtin-types):
Move the definitions to after the built-in classes are defined,
and rewrite to make use of those classes.

* lisp/emacs-lisp/cl-extra.el (cl-describe-type):
Accept two (unused) optional args, for use with `describe-symbol-backends`.
(describe-symbol-backends): Simplify accordingly and
add ourselves at the end.
(cl--class-children): New function.
(cl--describe-class): Use it.  Also don't show a silly empty list of slots
for the built-in types.
etc/NEWS
lisp/emacs-lisp/cl-extra.el
lisp/emacs-lisp/cl-preloaded.el